<?php
// 管理抽奖结果
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class LotteryResult extends Model
{
    use HasFactory;

    protected $fillable = [
        'wechat_users_id',
        'verification_codes_id',
        'draw_time'
    ];

    protected $casts = [
        'draw_time' => 'datetime'
    ];

    public function wechatUser()
    {
        return $this->belongsTo(WechatUser::class, 'wechat_users_id');
    }

    public function verificationCode()
    {
        return $this->belongsTo(VerificationCode::class, 'verification_codes_id');
    }
} 